home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / GetPixels.3 < prev    next >
Text File  |  1995-07-25  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333))))              TTTTkkkk (((( ))))               TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_GetPixels, Tk_GetScreenMM - translate between strings and  |
  12.           screen units                                                  |
  13.  
  14.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS                                                           ||||
  15.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>                                               |
  16.  
  17.           int                                                           |
  18.           TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((_i_n_t_e_r_p, _t_k_w_i_n, _s_t_r_i_n_g, _i_n_t_P_t_r))))                   |
  19.  
  20.           int                                                           |
  21.           TTTTkkkk____GGGGeeeettttSSSSccccrrrreeeeeeeennnnMMMMMMMM((((_i_n_t_e_r_p, _t_k_w_i_n, _s_t_r_i_n_g, _d_o_u_b_l_e_P_t_r))))              |
  22.  
  23.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS                                                          ||||
  24.           Tcl_Interp   *_i_n_t_e_r_p    (in)                                       ||
  25.                                             Interpreter   to  use  for  |
  26.                                             error reporting.            |
  27.  
  28.           Tk_Window    _t_k_w_i_n      (in)                                       ||
  29.                                             Window     whose    screen  |
  30.                                             geometry  determines   the  |
  31.                                             conversion         between  |
  32.                                             absolute units and pixels.  |
  33.  
  34.           char         *_s_t_r_i_n_g    (in)                                       ||
  35.                                             String  that  specifies  a  |
  36.                                             distance on the screen.     |
  37.  
  38.           int          *_i_n_t_P_t_r    (out)                                      ||
  39.                                             Pointer   to  location  in  |
  40.                                             which to  store  converted  |
  41.                                             distance in pixels.         |
  42.  
  43.           double       *_d_o_u_b_l_e_P_t_r (out)                                      ||
  44.                                             Pointer   to  location  in  |
  45.                                             which to  store  converted  |
  46.                                             distance in millimeters.    |
  47.      _________________________________________________________________  |
  48.  
  49.  
  50.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN                                                        ||||
  51.           These two procedures take as  argument  a  specification  of  |
  52.           distance   on   the   screen   (_s_t_r_i_n_g)   and   compute  the  |
  53.           corresponding  distance  either   in   integer   pixels   or  |
  54.           floating-point   millimeters.    In   either   case,  _s_t_r_i_n_g  |
  55.           specifies a  screen  distance  as  a  floating-point  number  |
  56.           followed  by  one of the following characters that indicates  |
  57.           units:                                                        |
  58.  
  59.           <none>                                                             ||
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333))))              TTTTkkkk (((( ))))               TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333))))
  71.  
  72.  
  73.  
  74.                The number specifies a distance in pixels.               |
  75.  
  76.           cccc                                                                  ||
  77.                The  number  specifies a distance in centimeters on the  |
  78.                screen.                                                  |
  79.  
  80.           iiii                                                                  ||
  81.                The  number  specifies  a  distance  in  inches  on the  |
  82.                screen.                                                  |
  83.  
  84.           mmmm                                                                  ||
  85.                The  number  specifies a distance in millimeters on the  |
  86.                screen.                                                  |
  87.  
  88.           pppp                                                                  ||
  89.                The  number  specifies  a  distance in printer's points  |
  90.                (1/72 inch) on the screen.                               |
  91.  
  92.           TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss converts _s_t_r_i_n_g to the nearest even  number  of  |
  93.           pixels  and  stores  that  value at *_i_n_t_P_t_r.  TTTTkkkk____GGGGeeeettttSSSSccccrrrreeeeeeeennnnMMMMMMMM  |
  94.           converts  _s_t_r_i_n_g  to  millimeters  and  stores  the  double-  |
  95.           precision floating-point result at *_d_o_u_b_l_e_P_t_r.                |
  96.  
  97.           Both procedures return TTTTCCCCLLLL____OOOOKKKK  under  normal  circumstances.  |
  98.           If  an  error occurs (e.g. _s_t_r_i_n_g contains a number followed  |
  99.           by a character that  isn't  one  of  the  ones  above)  then  |
  100.           TTTTCCCCLLLL____EEEERRRRRRRROOOORRRR  is  returned  and  an  error  message  is left in  |
  101.           _i_n_t_e_r_p->_r_e_s_u_l_t.                                               |
  102.  
  103.  
  104.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS                                                           ||||
  105.           centimeters, convert, inches, millimeters,  pixels,  points,  |
  106.           screen units
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.